let html = '';
html += '
test
';
html += 'test
';
$('#fonts').append(html);
function updateFonts() {
for(let text in gameText) {
if(gameText[text].style.fontFamily === 'style1') {
gameText[text].style.fontFamily = font.style1.name;
gameText[text].style.fontSize *= font.style1.sizeDelta;
gameText[text].y += font.style1.yDelta * gameText[text].style.fontSize;
if(font.style1.weight !== 'auto') gameText[text].style.fontWeight = font.style1.weight;
} else if(gameText[text].style.fontFamily === 'style2') {
gameText[text].style.fontFamily = font.style2.name;
gameText[text].style.fontSize *= font.style2.sizeDelta;
gameText[text].y += font.style2.yDelta * gameText[text].style.fontSize;
if(font.style2.weight !== 'auto') gameText[text].style.fontWeight = font.style2.weight;
}
}
if(typeof gameTextVertical !== "undefined") {
for(let text in gameTextVertical) {
if(gameTextVertical[text].style.fontFamily === 'style1') {
gameTextVertical[text].style.fontFamily = font.style1.name;
gameTextVertical[text].style.fontSize *= font.style1.sizeDelta;
gameTextVertical[text].y += font.style1.yDelta * gameTextVertical[text].style.fontSize;
if(font.style1.weight !== 'auto') gameTextVertical[text].style.fontWeight = font.style1.weight;
} else if(gameTextVertical[text].style.fontFamily === 'style2') {
gameTextVertical[text].style.fontFamily = font.style2.name;
gameTextVertical[text].style.fontSize *= font.style2.sizeDelta;
gameTextVertical[text].y += font.style2.yDelta * gameTextVertical[text].style.fontSize;
if(font.style2.weight !== 'auto') gameTextVertical[text].style.fontWeight = font.style2.weight;
}
}
}
}